package com.gaogzhen.designPattern.immutableObject.immutable;

import lombok.extern.slf4j.Slf4j;

import java.time.format.DateTimeFormatter;

@Slf4j(topic = "c.DateFormatMutable")
public class DateFormatImmutable {
    public static void main(String[] args) {
        DateTimeFormatter sdf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        for (int i = 0; i < 10; i++) {
            new Thread(() -> {
                log.debug("{}",sdf.parse("2021-10-01"));
            }).start();
        }
    }
}
